/*
 * Copyright 2024 The JA-SIG Collaborative. All rights reserved.
 * distributed with thi file and available online at
 */
package com.lap.auth.adapter.driving.persistence.user.mapper;

import com.lap.auth.adapter.driving.persistence.user.po.UserPo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

/**
 * <strong>Mybatis 接口说明</strong>
 *
 * <table border="1">
 *   <tr>
 *      <th width="20%">类型</th>
 *      <th>方法名</th>
 *      <th width="20%">说明</th>
 *   </tr>
 *   <tr>
 *     <td>查询单个</td>
 *     <td>selectById(Long id)</td>
 *     <td>按主键查</td>
 *   </tr>
 *   <tr>
 *     <td>查询多个</td>
 *     <td>selectByIds(List<Long> ids)</td>
 *     <td>批量查</td>
 *   </tr>
 *   <tr>
 *     <td>条件查询</td>
 *     <td>selectByCondition(UserQuery query)</td>
 *     <td>复杂查询</td>
 *   </tr>
 *   <tr>
 *     <td>插入</td>
 *     <td>insert(UserDO user)</td>
 *     <td>插入单个</td>
 *   </tr>
 *   <tr>
 *     <td>更新全量</td>
 *     <td>updateById(UserDO user)</td>
 *     <td>全字段更新</td>
 *   </tr>
 *   <tr>
 *     <td>更新局部</td>
 *     <td>updateStatusById(Long id, Integer status)</td>
 *     <td>更新部分字段</td>
 *   </tr>
 *   <tr>
 *     <td>删除软</td>
 *     <td>softDeleteById(Long id)</td>
 *     <td>设置 deleted = true</td>
 *   </tr>
 *   <tr>
 *     <td>删除物理</td>
 *     <td>deleteById(Long id)</td>
 *     <td>真正删除</td>
 *   </tr>
 * </table>
 *
 * <p><strong>系统管理员持久操作对象</strong>
 *
 * <ol>
 *   <li>表名
 *   <li><em>sys_user</em>
 * </ol>
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@Mapper
public interface UserMapper {

  void insert(UserPo userPo);

  int deleteById(Integer userId);

  UserPo selectById(Integer id);

  UserPo selectByUsername(String username);

  List<UserPo> selectByIds(List<Integer> ids);

  int updateById(UserPo userPo);
}
